package cn.javase.base.io._06_打印流;

import org.junit.jupiter.api.Test;

import java.io.*;

public class _打印流测试 {

    @Test
    public void test() throws FileNotFoundException {
        String path = "D:\\Code\\study\\JavaCode\\JavaSEDemo\\base\\src\\main\\java\\cn\\javase\\base\\io\\_06_打印流\\info.log";
        PrintStream printStream = new PrintStream(path);
        printStream.append("你好");
        printStream.close();
        PrintWriter printWriter = new PrintWriter(path.replace("log", "log1"));
        printWriter.append("你好abc");
        printWriter.close();
    }

}
